class _BaseState(object):
    _basestate = None

    def __new__(cls, *args, **kwargs):
        obj = object.__new__(cls)
        if cls._basestate not in obj.__class__.__bases__:
            obj.__class__.__bases__ += (cls._basestate,)
        return obj
